﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FastDFS.WinForm.Models;

namespace FastDFS.WinForm
{
    public class LocalDataContextFactory
    {

        public static readonly string App_Data_DIR = Environment.CurrentDirectory + "APP_Data";

        public static FDFSTableDataContext getFDFSDataContext()
        {
            return null;//new FDFSTableDataContext(getConnectionStr("FDFS"));
        }

        private static string getConnectionStr(string name)
        {


            // if (!_DATACONTEXTS.ContainsKey(name)) {
            string conStr = System.Configuration.ConfigurationManager.ConnectionStrings[name].ConnectionString;
            conStr = conStr.Replace("~", Environment.CurrentDirectory);
            return conStr;



        }

    }
}
